[#ftl]
[#compress]
[#include "util10.ftl"/]
[#assign theme = "claro"/]
[@keyword "agile"/]
[@keyword "agile.Application"/]
[@keyword "agile.MessageDialog"/]
[@method "showLoadingMessage"/]
[@method "showErrorMessage"/]
<!DOCTYPE html>
[@shrinksafe key="html" cached=shrinkCached shrink=shrink contentType="html"]	
[#if applicationMode = "PROD"]
<html manifest="index1CacheManifest.manifest">
[#else]
<html>
[/#if]
<head>
	[@htmlMeta/]
	<style type="text/css">
		@import "/dojo10/dojo/resources/dojo.css";
		@import "/dojo10/dijit/themes/claro/claro.css";
	</style>
	<style type="text/css">
		.test {background-color:blue!important}	
		[#if applicationMode = "DEV"][#include "indexCss.ftl"/][/#if]
	</style>
[/@]	
	<script type="text/javascript">
      var dojoConfig = {parseOnLoad:false,isDebug:true,async:true};
	  	[@dynamicLoader/]
	  	var cache = window.applicationCache;
		if(cache){
				cache.addEventListener('updateready', function(e) {
				cache.swapCache();		
			    //console.log("reload*******************")
				window.location.reload();	
			}, false);
		}
		
    </script> 
	<script type="text/javascript" src="/dojo10/dojo/dojo.js"></script>
	<script type="text/javascript">
	require({async:false},["dojo/ready"],function(ready){window["ready"] = ready;});
	ready(function(){ 
		console.info("Beyond-Prototype starts......Auto-generated at ${.now}");	
		[#if applicationMode = "DEV"]	
			[#include "indexJs.ftl"/]
		[#else]
			_loadScript("index.js");
		[/#if]

	});
	</script>
	
	
</head>
<body class="${theme} bp_theme">
[@shrinksafe key="body" cached=shrinkCached shrink=shrink contentType="html"]	
	<div style="margin:auto;position:absolute;top:0px;left:0px;bottom:0px;right:0px;width:65%;height:30%" id="welcomeNode">
		[@logo webAppVersion/]		
		<div style="font-size:1.2em;">It may take several minutes for the first time, please be patient.</div>
		<div style="color:#0000ff;font-size:1.8em;font-style:italic" id="errorMsg">Loading resources, please wait...</div>
		<div style="color:red;font-size:1.2em;font-style:italic" id="warningMsg"></div>
		[#--
		<table>
			<tr>
			<td>[@logo/]</td>
			<td style="font-size:1.2em;font-style:italic;text-shadow:1px 1px 0px #cccccc">&nbsp;${webAppVersion}</td>
			</tr>
			<tr>
				<td nowrap><div style="font-size:1em;">It may take several minutes for the first time, please be patient.</div></td>
				<td></td>
			</tr>
			<tr>
				<td nowrap><div style="font-size:1.2em;" id="errorMsg">Loading resources, please wait...</div></td>
				<td></td>
			</tr>
			<tr>
				<td nowrap><div style="font-size:1.2em;font-style:italic" id="warningMsg"></div></td>
				<td></td>
			</tr>
		</table>	
		--]
	</div>
	
    <div data-dojo-id="_previewer" title="Prototype Preview" data-dojo-type="dijit.Dialog" style="display:none;width:99%;height:99%;background-color:white;overflow:hidden"></div>
    <div data-dojo-type="agile.MessageDialog" style="display:none;width:400px;height:150px;background-color:white"></div>
    <div data-dojo-type="agile.WidgetStoreDialog" style="display:none;width:400px;height:350px;background-color:white"></div>   
	<div data-dojo-id="mainApplication" data-dojo-type="agile.Application"></div>	
	
[/@]
</body>
</html>
[/#compress]